unit LabelButton;

interface

uses
  Windows, Messages, SysUtils, Classes, Controls, StdCtrls;

type
  TLabelButton = class(TLabel)
  private
    { Private declarations }
    procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER;
    procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
  protected
    { Protected declarations }
  public
    { Public declarations }
  published
    { Published declarations }
  end;

procedure Register;

implementation

procedure TLabelButton.CMMouseEnter(var Message: TMessage); 
begin
  Transparent := false;
  inherited;
end;

procedure TLabelButton.CMMouseLeave(var Message: TMessage);
begin
  Transparent := true;
  inherited;
end;

procedure Register;
begin
  RegisterComponents('mySHAO', [TLabelButton]);
end;

end.
